<?php
	Connection::getConnect();
	$sql = "SELECT *,AVG(total_sales) AS sales FROM item_details id JOIN item_sales USING(iid) JOIN item_inventory USING(iid) GROUP BY iid ORDER BY sales DESC LIMIT 10";
    Connection::setQuery($sql);
	$lists = Connection::fetchAll(MYSQL_ASSOC);
 ?>
